package com.itgaoshu.hospitalproject.service.impl;

import com.itgaoshu.hospitalproject.bean.Upplier;
import com.itgaoshu.hospitalproject.mapper.UpplierMapper;
import com.itgaoshu.hospitalproject.service.UpplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class UpplierServiceImpl implements UpplierService {

    @Autowired
    private UpplierMapper upplierMapper;

    @Override
    public List<Upplier> findAllUpplier(String supplierName) {
        return upplierMapper.findAllUpplier(supplierName);
    }

    @Override
    public int addUpplier(String supplierName) {
        return upplierMapper.addUpplier(supplierName);
    }

    @Override
    public int count(String supplierName) {
        return upplierMapper.count(supplierName);
    }

    @Override
    public int deleteUpplier(int supplierId) {
        return upplierMapper.deleteUpplier(supplierId);
    }
}
